using System;
using System.Text;
using System.Collections.Generic;


namespace Managistics.Model {
    
    public class DetailOrderCus {
        private string _orderid;
        private string _itemId;
        private OrderCustomers _orderCustomers;
        private Items _items;
        private float? _quantity;
        private float? _discount;
        private float? _unitPrice;
        private bool? _statusItemC;
        private short? _vat;
        private string _remark;
        private int? _number;
        private string _department;
        private double _id;
        public virtual string Orderid {
            get {
                return this._orderid;
            }
            set {
                this._orderid = value;
            }
        }
        public virtual string ItemId {
            get {
                return this._itemId;
            }
            set {
                this._itemId = value;
            }
        }
        public virtual OrderCustomers OrderCustomers {
            get {
                return this._orderCustomers;
            }
            set {
                this._orderCustomers = value;
            }
        }
        public virtual Items Items {
            get {
                return this._items;
            }
            set {
                this._items = value;
            }
        }
        public virtual float? Quantity {
            get {
                return this._quantity;
            }
            set {
                this._quantity = value;
            }
        }
        public virtual float? Discount {
            get {
                return this._discount;
            }
            set {
                this._discount = value;
            }
        }
        public virtual float? UnitPrice {
            get {
                return this._unitPrice;
            }
            set {
                this._unitPrice = value;
            }
        }
        public virtual bool? StatusItemC {
            get {
                return this._statusItemC;
            }
            set {
                this._statusItemC = value;
            }
        }
        public virtual short? Vat {
            get {
                return this._vat;
            }
            set {
                this._vat = value;
            }
        }
        public virtual string Remark {
            get {
                return this._remark;
            }
            set {
                this._remark = value;
            }
        }
        public virtual int? Number {
            get {
                return this._number;
            }
            set {
                this._number = value;
            }
        }
        public virtual string Department {
            get {
                return this._department;
            }
            set {
                this._department = value;
            }
        }
        public virtual double Id {
            get {
                return this._id;
            }
            set {
                this._id = value;
            }
        }
        #region NHibernate Composite Key Requirements
        public override bool Equals(object obj) {
			if (obj == null) return false;
			var t = obj as DetailOrderCus;
			if (t == null) return false;
			if (Orderid == t.Orderid
			 && ItemId == t.ItemId)
				return true;

			return false;
        }
        public override int GetHashCode() {
			int hash = GetType().GetHashCode();
			hash = (hash * 397) ^ Orderid.GetHashCode();
			hash = (hash * 397) ^ ItemId.GetHashCode();

			return hash;
        }
        #endregion
    }
}
